package com.yonyou.ncmm_pac_pda;

import com.yonyou.uap.um.application.ApplicationContext;
import com.yonyou.uap.um.base.*;
import com.yonyou.uap.um.common.*;
import com.yonyou.uap.um.third.*;
import com.yonyou.uap.um.control.*;
import com.yonyou.uap.um.core.*;
import com.yonyou.uap.um.binder.*;
import com.yonyou.uap.um.runtime.*;
import com.yonyou.uap.um.lexer.*;
import com.yonyou.uap.um.widget.*;
import com.yonyou.uap.um.widget.UmpSlidingLayout.SlidingViewType;
import com.yonyou.uap.um.log.ULog;
import java.util.*;
import android.os.*;
import android.view.*;
import android.widget.*;
import android.webkit.*;
import android.content.*;
import android.graphics.*;
import android.widget.ImageView.ScaleType;

public abstract class HomePageActivity extends UMWindowActivity {

	protected UMWindow HomePage = null;
protected XVerticalLayout viewPage0 = null;
protected XHorizontalLayout navigatorbar0 = null;
protected UMImageButton btn_menu = null;
protected UMScrollView Scrollview_panel4 = null;
protected XVerticalLayout panel4 = null;
protected XHorizontalLayout row0 = null;
protected UMImageButton imagebutton0 = null;
protected UMImageButton imagebutton4 = null;
protected UMImageButton imagebutton5 = null;
protected UMImageButton imagebutton11 = null;
protected XHorizontalLayout row1 = null;
protected UMImageButton imagebutton6 = null;
protected UMImageButton imagebutton10 = null;
protected UMImageButton imagebutton9 = null;
protected UMImageButton imagebutton7 = null;
protected XHorizontalLayout row2 = null;
protected UMImageButton imagebutton8 = null;
protected UMImageButton imagebutton12 = null;
protected UMImageButton imagebutton13 = null;
protected XRelativeLayout panel9 = null;

	
	protected final static int ID_HOMEPAGE = 1386839462;
protected final static int ID_VIEWPAGE0 = 485632215;
protected final static int ID_NAVIGATORBAR0 = 1269821499;
protected final static int ID_BTN_MENU = 660936456;
protected final static int ID_SCROLLVIEW_PANEL4 = 177889512;
protected final static int ID_PANEL4 = 1306612637;
protected final static int ID_ROW0 = 680279094;
protected final static int ID_IMAGEBUTTON0 = 1851032916;
protected final static int ID_IMAGEBUTTON4 = 1380610363;
protected final static int ID_IMAGEBUTTON5 = 500218341;
protected final static int ID_IMAGEBUTTON11 = 1339076914;
protected final static int ID_ROW1 = 223374452;
protected final static int ID_IMAGEBUTTON6 = 797109385;
protected final static int ID_IMAGEBUTTON10 = 97372064;
protected final static int ID_IMAGEBUTTON9 = 266415656;
protected final static int ID_IMAGEBUTTON7 = 26754864;
protected final static int ID_ROW2 = 222808601;
protected final static int ID_IMAGEBUTTON8 = 366760510;
protected final static int ID_IMAGEBUTTON12 = 670882348;
protected final static int ID_IMAGEBUTTON13 = 1822807480;
protected final static int ID_PANEL9 = 1942917972;

	
	
	@Override
	public String getControllerName() {
		return "HomePageController";
	}
	
	@Override
	public String getContextName() {
		return "";
	}

	@Override
	public String getNameSpace() {
		return "com.yonyou.ncmm_pac_pda";
	}

	protected void onCreate(Bundle savedInstanceState) {
		ULog.logLC("onCreate", this);
		super.onCreate(savedInstanceState);
        onInit(savedInstanceState);
        
	}
	
	@Override
	protected void onStart() {
		ULog.logLC("onStart", this);
		
		super.onStart();
	}

	@Override
	protected void onRestart() {
		ULog.logLC("onRestart", this);
		
		super.onRestart();
	}

	@Override
	protected void onResume() {
		ULog.logLC("onResume", this);
		
		super.onResume();
	}

	@Override
	protected void onPause() {
		ULog.logLC("onPause", this);
		
		super.onPause();
	}

	@Override
	protected void onStop() {
		ULog.logLC("onStop", this);
		
		super.onStop();
	}

	@Override
	protected void onDestroy() {
		ULog.logLC("onDestroy", this);
		
		super.onDestroy();
	}
	
	public  void onInit(Bundle savedInstanceState) {
		ULog.logLC("onInit", this);
		UMActivity context = this;
		registerControl();
		this.getContainer();
		
		/*
		 new Thread() {
			 public void run() {
				 UMPDebugClient.startServer();
			 }
		 }.start();
		*/
		String sys_debug = ApplicationContext.getCurrent(this).getValue("sys_debug");
		if (sys_debug != null && sys_debug.equalsIgnoreCase("true")) {
			UMPDebugClient.waitForDebug();
		}

		IBinderGroup binderGroup = this;
		currentPage = getCurrentWindow(context, binderGroup);
super.setContentView(currentPage);

		
	}
	
	private void registerControl() {
		  idmap.put("HomePage",ID_HOMEPAGE);
  idmap.put("viewPage0",ID_VIEWPAGE0);
  idmap.put("navigatorbar0",ID_NAVIGATORBAR0);
  idmap.put("btn_menu",ID_BTN_MENU);
  idmap.put("Scrollview_panel4",ID_SCROLLVIEW_PANEL4);
  idmap.put("panel4",ID_PANEL4);
  idmap.put("row0",ID_ROW0);
  idmap.put("imagebutton0",ID_IMAGEBUTTON0);
  idmap.put("imagebutton4",ID_IMAGEBUTTON4);
  idmap.put("imagebutton5",ID_IMAGEBUTTON5);
  idmap.put("imagebutton11",ID_IMAGEBUTTON11);
  idmap.put("row1",ID_ROW1);
  idmap.put("imagebutton6",ID_IMAGEBUTTON6);
  idmap.put("imagebutton10",ID_IMAGEBUTTON10);
  idmap.put("imagebutton9",ID_IMAGEBUTTON9);
  idmap.put("imagebutton7",ID_IMAGEBUTTON7);
  idmap.put("row2",ID_ROW2);
  idmap.put("imagebutton8",ID_IMAGEBUTTON8);
  idmap.put("imagebutton12",ID_IMAGEBUTTON12);
  idmap.put("imagebutton13",ID_IMAGEBUTTON13);
  idmap.put("panel9",ID_PANEL9);

	}
	
	public void onLoad() {
		ULog.logLC("onLoad", this);
		if(currentPage!=null) {
			currentPage.onLoad();
		}
	
		{ //panel4 - action:panel4_onload
    UMEventArgs args = new UMEventArgs(HomePageActivity.this);
    actionPanel4_onload(panel4,args);

}

	}
	
	public void onDatabinding() {
		ULog.logLC("onDatabinding", this);
		super.onDatabinding();
		
	}
	
	@Override
	public void onReturn(String methodName, Object returnValue) {
		
	}

	@Override
	public void onAfterInit() {
		ULog.logLC("onAfterInit", this);
		
		onLoad();
	}
	
		@Override
	public Map<String,String> getPlugout(String id) {
		XJSON from = this.getUMContext();
		Map<String,String> r = super.getPlugout(id);
		
		return r;	
	}
	
	
	
	public View getNavigatorbar0View(final UMActivity context,IBinderGroup binderGroup) {
navigatorbar0 = (XHorizontalLayout)ThirdControl.createControl(new XHorizontalLayout(context),ID_NAVIGATORBAR0
,"color","#323232"
,"padding-left","8"
,"font-size","18"
,"valign","center"
,"title","主界面"
,"background","#0aa9ff"
,"width","fill"
,"font-family","default"
,"background-image","navbar_login.png"
,"layout-type","vbox"
,"halign","RIGHT"
,"padding-right","8"
,"height","44.0"
);
btn_menu = (UMImageButton)ThirdControl.createControl(new UMImageButton(context),ID_BTN_MENU
,"padding-top","9"
,"font-pressed-color","#e50011"
,"color","#919191"
,"icon-pressed-image","tab_more_touch.png"
,"onclick","action:btn_menu_onclick"
,"icon-height","25"
,"font-size","16"
,"valign","center"
,"icon-text-spacing","3"
,"icon-background-image","tab_more.png"
,"istogglebutton","false"
,"width","40"
,"checked","false"
,"font-family","default"
,"layout-type","hbox"
,"halign","right"
,"icon-width","25"
,"height","fill"
);
navigatorbar0.addView(btn_menu);

return navigatorbar0;
}
public View getRow0View(final UMActivity context,IBinderGroup binderGroup) {
row0 = (XHorizontalLayout)ThirdControl.createControl(new XHorizontalLayout(context),ID_ROW0
,"width","fill"
,"valign","center"
,"margin-top","10"
,"layout-type","vbox"
,"halign","CENTER"
,"height","100"
);
imagebutton0 = (UMImageButton)ThirdControl.createControl(new UMImageButton(context),ID_IMAGEBUTTON0
,"font-pressed-color","#e50011"
,"color","#00458a"
,"icon-pressed-image","arrive.png"
,"onclick","action:imagebutton0_onclick"
,"icon-height","56"
,"weight","1"
,"font-size","12"
,"valign","center"
,"icon-text-spacing","3"
,"icon-background-image","arrive.png"
,"istogglebutton","false"
,"width","0"
,"checked","false"
,"font-family","default"
,"layout-type","hbox"
,"halign","center"
,"icon-width","56"
,"value","采购到货"
,"height","fill"
);
row0.addView(imagebutton0);
imagebutton4 = (UMImageButton)ThirdControl.createControl(new UMImageButton(context),ID_IMAGEBUTTON4
,"font-pressed-color","#e50011"
,"color","#00458a"
,"icon-pressed-image","instore.png"
,"onclick","action:imagebutton4_onclick"
,"icon-height","56"
,"weight","1"
,"font-size","12"
,"valign","center"
,"icon-text-spacing","3"
,"icon-background-image","instore.png"
,"istogglebutton","false"
,"width","0"
,"checked","false"
,"font-family","default"
,"layout-type","hbox"
,"halign","center"
,"icon-width","56"
,"value","采购入库"
,"height","fill"
);
row0.addView(imagebutton4);
imagebutton5 = (UMImageButton)ThirdControl.createControl(new UMImageButton(context),ID_IMAGEBUTTON5
,"font-pressed-color","#e50011"
,"color","#00458a"
,"icon-pressed-image","instore.png"
,"onclick","action:imagebutton5_onclick"
,"icon-height","56"
,"weight","1"
,"font-size","12"
,"valign","center"
,"icon-text-spacing","3"
,"icon-background-image","instore.png"
,"istogglebutton","false"
,"width","0"
,"checked","false"
,"font-family","default"
,"layout-type","hbox"
,"halign","center"
,"icon-width","56"
,"value","产成品入库"
,"height","fill"
);
row0.addView(imagebutton5);
imagebutton11 = (UMImageButton)ThirdControl.createControl(new UMImageButton(context),ID_IMAGEBUTTON11
,"font-pressed-color","#e50011"
,"color","#00458a"
,"icon-pressed-image","instore.png"
,"onclick","action:imagebutton11_onclick"
,"icon-height","56"
,"weight","1"
,"font-size","12"
,"valign","center"
,"icon-text-spacing","3"
,"icon-background-image","instore.png"
,"istogglebutton","false"
,"width","0"
,"checked","false"
,"font-family","default"
,"layout-type","hbox"
,"halign","center"
,"icon-width","56"
,"value","调拨入库"
,"height","fill"
);
row0.addView(imagebutton11);

return row0;
}
public View getRow1View(final UMActivity context,IBinderGroup binderGroup) {
row1 = (XHorizontalLayout)ThirdControl.createControl(new XHorizontalLayout(context),ID_ROW1
,"width","fill"
,"valign","center"
,"layout-type","vbox"
,"halign","CENTER"
,"height","100"
);
imagebutton6 = (UMImageButton)ThirdControl.createControl(new UMImageButton(context),ID_IMAGEBUTTON6
,"font-pressed-color","#e50011"
,"color","#00458a"
,"icon-pressed-image","button_image_touch"
,"onclick","action:imagebutton6_onclick"
,"icon-height","56"
,"weight","1"
,"font-size","12"
,"valign","center"
,"icon-text-spacing","3"
,"icon-background-image","outstore.png"
,"istogglebutton","false"
,"width","0"
,"checked","false"
,"font-family","default"
,"layout-type","hbox"
,"halign","center"
,"icon-width","56"
,"value","销售出库"
,"height","fill"
);
row1.addView(imagebutton6);
imagebutton10 = (UMImageButton)ThirdControl.createControl(new UMImageButton(context),ID_IMAGEBUTTON10
,"font-pressed-color","#e50011"
,"color","#00458a"
,"icon-pressed-image","outstore.png"
,"onclick","action:imagebutton10_onclick"
,"icon-height","56"
,"weight","1"
,"font-size","12"
,"valign","center"
,"icon-text-spacing","3"
,"icon-background-image","outstore.png"
,"istogglebutton","false"
,"width","0"
,"checked","false"
,"font-family","default"
,"layout-type","hbox"
,"halign","center"
,"icon-width","56"
,"value","订单出库"
,"height","fill"
);
row1.addView(imagebutton10);
imagebutton9 = (UMImageButton)ThirdControl.createControl(new UMImageButton(context),ID_IMAGEBUTTON9
,"font-pressed-color","#e50011"
,"color","#00458a"
,"icon-pressed-image","outstore.png"
,"onclick","action:imagebutton9_onclick"
,"icon-height","56"
,"weight","1"
,"font-size","12"
,"valign","center"
,"icon-text-spacing","3"
,"icon-background-image","outstore.png"
,"istogglebutton","false"
,"width","0"
,"checked","false"
,"font-family","default"
,"layout-type","hbox"
,"halign","center"
,"icon-width","56"
,"value","材料出库"
,"height","fill"
);
row1.addView(imagebutton9);
imagebutton7 = (UMImageButton)ThirdControl.createControl(new UMImageButton(context),ID_IMAGEBUTTON7
,"font-pressed-color","#e50011"
,"color","#00458a"
,"icon-pressed-image","outstore.png"
,"onclick","action:imagebutton7_onclick"
,"icon-height","56"
,"weight","1"
,"font-size","12"
,"valign","center"
,"icon-text-spacing","3"
,"icon-background-image","outstore.png"
,"istogglebutton","false"
,"width","0"
,"checked","false"
,"font-family","default"
,"layout-type","hbox"
,"halign","center"
,"icon-width","56"
,"value","调拨出库"
,"height","fill"
);
row1.addView(imagebutton7);

return row1;
}
public View getRow2View(final UMActivity context,IBinderGroup binderGroup) {
row2 = (XHorizontalLayout)ThirdControl.createControl(new XHorizontalLayout(context),ID_ROW2
,"width","fill"
,"valign","center"
,"layout-type","vbox"
,"halign","CENTER"
,"height","100"
);
imagebutton8 = (UMImageButton)ThirdControl.createControl(new UMImageButton(context),ID_IMAGEBUTTON8
,"font-pressed-color","#e50011"
,"color","#00458a"
,"icon-pressed-image","invcount.png"
,"onclick","action:imagebutton8_onclick"
,"icon-height","56"
,"weight","1"
,"font-size","12"
,"valign","center"
,"icon-text-spacing","3"
,"icon-background-image","invcount.png"
,"istogglebutton","false"
,"width","0"
,"checked","false"
,"font-family","default"
,"layout-type","hbox"
,"halign","center"
,"icon-width","56"
,"value","库存盘点"
,"height","fill"
);
row2.addView(imagebutton8);
imagebutton12 = (UMImageButton)ThirdControl.createControl(new UMImageButton(context),ID_IMAGEBUTTON12
,"font-pressed-color","#e50011"
,"color","#00458a"
,"icon-pressed-image","whstrans.png"
,"onclick","action:imagebutton12_onclick"
,"icon-height","56"
,"weight","1"
,"font-size","12"
,"valign","center"
,"icon-text-spacing","3"
,"icon-background-image","whstrans.png"
,"istogglebutton","false"
,"width","0"
,"checked","false"
,"font-family","default"
,"layout-type","hbox"
,"halign","center"
,"icon-width","56"
,"value","转库确认"
,"height","fill"
);
row2.addView(imagebutton12);
imagebutton13 = (UMImageButton)ThirdControl.createControl(new UMImageButton(context),ID_IMAGEBUTTON13
,"font-pressed-color","#e50011"
,"color","#00458a"
,"icon-pressed-image","whstrans.png"
,"onclick","action:imagebutton13_onclick"
,"icon-height","56"
,"weight","1"
,"font-size","12"
,"valign","center"
,"icon-text-spacing","3"
,"icon-background-image","whstrans.png"
,"istogglebutton","false"
,"width","0"
,"checked","false"
,"font-family","default"
,"layout-type","hbox"
,"halign","center"
,"icon-width","56"
,"value","到库打印"
,"height","fill"
);
row2.addView(imagebutton13);
panel9 = (XRelativeLayout)ThirdControl.createControl(new XRelativeLayout(context),ID_PANEL9
,"width","0"
,"weight","1"
,"layout-type","hbox"
,"height","20"
);
row2.addView(panel9);

return row2;
}
public View getPanel4View(final UMActivity context,IBinderGroup binderGroup) {
panel4 = (XVerticalLayout)ThirdControl.createControl(new XVerticalLayout(context),ID_PANEL4
,"width","fill"
,"valign","TOP"
,"layout-type","vbox"
,"halign","center"
,"onload","action:panel4_onload"
,"height","wrap"
);
View row0 = (View) getRow0View((UMActivity)context,binderGroup);
panel4.addView(row0);
View row1 = (View) getRow1View((UMActivity)context,binderGroup);
panel4.addView(row1);
View row2 = (View) getRow2View((UMActivity)context,binderGroup);
panel4.addView(row2);

return panel4;
}
public View getScrollview_panel4View(final UMActivity context,IBinderGroup binderGroup) {
Scrollview_panel4 = (UMScrollView)ThirdControl.createControl(new UMScrollView(context),ID_SCROLLVIEW_PANEL4
,"margin-left","10"
,"layout","vbox"
,"width","fill"
,"hscrollenabled","disabled"
,"weight","1"
,"layout-type","vbox"
,"height","0"
,"margin-right","10"
);
View panel4 = (View) getPanel4View((UMActivity)context,binderGroup);
Scrollview_panel4.addView(panel4);

return Scrollview_panel4;
}
public View getViewPage0View(final UMActivity context,IBinderGroup binderGroup) {
viewPage0 = (XVerticalLayout)ThirdControl.createControl(new XVerticalLayout(context),ID_VIEWPAGE0
,"background","#f7f8f8"
,"width","fill"
,"valign","TOP"
,"layout-type","vbox"
,"halign","center"
,"height","fill"
);
View navigatorbar0 = (View) getNavigatorbar0View((UMActivity)context,binderGroup);
viewPage0.addView(navigatorbar0);
View Scrollview_panel4 = (View) getScrollview_panel4View((UMActivity)context,binderGroup);
viewPage0.addView(Scrollview_panel4);

return viewPage0;
}
public UMWindow getCurrentWindow(final UMActivity context,IBinderGroup binderGroup) {
HomePage = (UMWindow)ThirdControl.createControl(new UMWindow(context),ID_HOMEPAGE
,"layout","vbox"
,"canvaswidth","375"
,"orientation","vertical"
,"controller","HomePageController"
,"canvasheight","667"
,"namespace","com.yonyou.ncmm_pac_pda"
,"width","fill"
,"valign","TOP"
,"layout-type","linear"
,"halign","center"
,"height","fill"
);
View viewPage0 = (View) getViewPage0View((UMActivity)context,binderGroup);
HomePage.addView(viewPage0);

return (UMWindow)HomePage;
}

	
	public void actionImagebutton5_onclick(View control, UMEventArgs args) {
    args.put("containerName","");
    args.put("language","javascript");
    String actionid = "imagebutton5_onclick";
  ActionProcessor.exec(this, actionid, args);
  this.getContainer().exec(actionid, "openbusiview('com.yonyou.ncmm_pac_pda.FPInListPage')",UMActivity.getViewId(control),args);
}
public void actionImagebutton10_onclick(View control, UMEventArgs args) {
    args.put("containerName","");
    args.put("language","javascript");
    String actionid = "imagebutton10_onclick";
  ActionProcessor.exec(this, actionid, args);
  this.getContainer().exec(actionid, "openbusiview('com.yonyou.ncmm_pac_pda.SaleOrderOutList')",UMActivity.getViewId(control),args);
}
public void actionPanel4_onload(View control, UMEventArgs args) {
    args.put("containerName","");
    args.put("language","javascript");
    String actionid = "panel4_onload";
  ActionProcessor.exec(this, actionid, args);
  this.getContainer().exec(actionid, "getdeviceinfo()",UMActivity.getViewId(control),args);
}
public void actionImagebutton6_onclick(View control, UMEventArgs args) {
    args.put("containerName","");
    args.put("language","javascript");
    String actionid = "imagebutton6_onclick";
  ActionProcessor.exec(this, actionid, args);
  this.getContainer().exec(actionid, "openbusiview('com.yonyou.ncmm_pac_pda.OutForSOList')",UMActivity.getViewId(control),args);
}
public void actionImagebutton12_onclick(View control, UMEventArgs args) {
    args.put("containerName","");
    args.put("language","javascript");
    String actionid = "imagebutton12_onclick";
  ActionProcessor.exec(this, actionid, args);
  this.getContainer().exec(actionid, "openbusiview('com.yonyou.ncmm_pac_pda.WhsTrans4KList')",UMActivity.getViewId(control),args);
}
public void actionBtn_menu_onclick(View control, UMEventArgs args) {
    args.put("containerName","");
    args.put("language","javascript");
    String actionid = "btn_menu_onclick";
  ActionProcessor.exec(this, actionid, args);
  this.getContainer().exec(actionid, "loadmenu()",UMActivity.getViewId(control),args);
}
public void actionImagebutton11_onclick(View control, UMEventArgs args) {
    args.put("containerName","");
    args.put("language","javascript");
    String actionid = "imagebutton11_onclick";
  ActionProcessor.exec(this, actionid, args);
  this.getContainer().exec(actionid, "openbusiview('com.yonyou.ncmm_pac_pda.TransInList')",UMActivity.getViewId(control),args);
}
public void actionImagebutton7_onclick(View control, UMEventArgs args) {
    args.put("containerName","");
    args.put("language","javascript");
    String actionid = "imagebutton7_onclick";
  ActionProcessor.exec(this, actionid, args);
  this.getContainer().exec(actionid, "openbusiview('com.yonyou.ncmm_pac_pda.TransOutList')",UMActivity.getViewId(control),args);
}
public void actionImagebutton0_onclick(View control, UMEventArgs args) {
    args.put("containerName","");
    args.put("language","javascript");
    String actionid = "imagebutton0_onclick";
  ActionProcessor.exec(this, actionid, args);
  this.getContainer().exec(actionid, "openbusiview('com.yonyou.ncmm_pac_pda.PoArriveList')",UMActivity.getViewId(control),args);
}
public void actionImagebutton9_onclick(View control, UMEventArgs args) {
    args.put("containerName","");
    args.put("language","javascript");
    String actionid = "imagebutton9_onclick";
  ActionProcessor.exec(this, actionid, args);
  this.getContainer().exec(actionid, "openbusiview('com.yonyou.ncmm_pac_pda.MaterialOutList')",UMActivity.getViewId(control),args);
}
public void actionImagebutton8_onclick(View control, UMEventArgs args) {
    args.put("containerName","");
    args.put("language","javascript");
    String actionid = "imagebutton8_onclick";
  ActionProcessor.exec(this, actionid, args);
  this.getContainer().exec(actionid, "openbusiview('com.yonyou.ncmm_pac_pda.InvCountListPage')",UMActivity.getViewId(control),args);
}
public void actionImagebutton13_onclick(View control, UMEventArgs args) {
    args.put("containerName","");
    args.put("language","javascript");
    String actionid = "imagebutton13_onclick";
  ActionProcessor.exec(this, actionid, args);
  this.getContainer().exec(actionid, "openbusiview('com.yonyou.ncmm_pac_pda.PrintBTConnect')",UMActivity.getViewId(control),args);
}
public void actionImagebutton4_onclick(View control, UMEventArgs args) {
    args.put("containerName","");
    args.put("language","javascript");
    String actionid = "imagebutton4_onclick";
  ActionProcessor.exec(this, actionid, args);
  this.getContainer().exec(actionid, "openbusiview('com.yonyou.ncmm_pac_pda.PurchaseInShowPage')",UMActivity.getViewId(control),args);
}


}
